package m_router

import (
	"accx/controllers"
	"github.com/gin-gonic/gin"
)

type Route struct {
	Method      string
	Pattern     string
	HandlerFunc gin.HandlerFunc
}

type Routes []Route

func NewSyncRoutes() Routes {
	routes := Routes{
		{
			Method:      "GET",
			Pattern:     "/coreNetwork/accx/managerment/v1/",
			HandlerFunc: controllers.SyncDataFromUDMTo,
		},
		{
			Method:      "PUT",
			Pattern:     "/v1/accxUdmDynamicData",
			HandlerFunc: controllers.AccxUdmDynamicData,
		},
		{
			Method:      "PUT",
			Pattern:     "/v1/accxDynamicData",
			HandlerFunc: controllers.AccxDynamicData,
		},
	}
	return routes
}

func NewAccxRoutes() Routes {
	routes := Routes{
		{
			Method:      "GET",
			Pattern:     "/v1/accList",
			HandlerFunc: controllers.AccList,
		},
		{
			Method:      "PUT",
			Pattern:     "/v1/handShake",
			HandlerFunc: controllers.HandShake,
		},
		{
			Method:      "PUT",
			Pattern:     "/v1/heartbeat",
			HandlerFunc: controllers.Heartbeat,
		},
	}
	return routes
}

//func initRouter(router *gin.Engine) {
//	demoGroup := router.Group("/demo")
//	{
//		demoGroup.GET("/", controllers.Demo)
//	}
//
//}
